package Service.imp;

import Dao.User;
import DaoMain.UserData;
import Service.inter.ServiceInter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class Service1 implements ServiceInter {
    @Autowired
    User dao;
    @Override
    public List<UserData> GetUserAll() {
        return dao.SelectAll();
    }

    @Override
    public UserData GetUser(int id) {
        return dao.SelectUser(id);
    }

    @Override
    public boolean DeleteUser(int id) {
        return dao.DeleteUser(id);
    }

    @Override
    public boolean InsertUser(UserData ud) {
        return dao.InsertUser(ud);
    }

    @Override
    public boolean UpData(UserData ud) {
        return dao.UpDate(ud);
    }
}
